import requests

# 伪装User-Agent
headers = {
    'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3'}

# 发送请求
url = 'https://www.pxc.jx.cn/'  # 替换为实际URL
response = requests.get(url, headers=headers)

# 确保请求成功
if response.status_code == 200:
    # 保存HTML到文件
    with open('D:\\萍乡学院.html', 'wb') as f:
        f.write(response.content)
else:
    print('请求失败，状态码：', response.status_code)